package com.qfedu.service.impl;

import com.qfedu.dao.AskForLeaveDao;
import com.qfedu.entity.AskForLeave;
import com.qfedu.service.AskForLeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * projectName: backStage
 * author: CGY
 * time: 2020/10/7 10:51
 * description:
 */
@Service
public class LeaveServiceImpl implements AskForLeaveService {
    @Autowired
    private AskForLeaveDao leaveDao;

    /**
     * 请假申请
     * @param askForLeave 页面的信息
     */
    @Override
    public void insertAskForLeave(AskForLeave askForLeave) {
        if (askForLeave == null) {
            throw new RuntimeException("数据异常");
        }
        leaveDao.insertAskForLeave(askForLeave);
    }

}
